package com.huaju.enity;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;

import static javax.persistence.GenerationType.IDENTITY;

import javax.persistence.Id;
import javax.persistence.Table;

import org.springframework.format.annotation.DateTimeFormat;

import com.fasterxml.jackson.annotation.JsonFormat;

/**
 * Systemlog entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "systemlog", catalog = "licai")
public class Systemlog implements java.io.Serializable {

	// Fields

	private Integer logId;
	private String content;
	private Date addTime;
	private String name;
	private String level;
	private String extr;

	// Constructors

	/** default constructor */
	public Systemlog() {
	}

	/** full constructor */
	public Systemlog(String content, Date addTime, String name,
			String level) {
		this.content = content;
		this.addTime = addTime;
		this.name = name;
		this.level = level;
	}

	// Property accessors
	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "log_id", unique = true, nullable = false)
	public Integer getLogId() {
		return this.logId;
	}

	public void setLogId(Integer logId) {
		this.logId = logId;
	}

	@Column(name = "content", length = 65535)
	public String getContent() {
		return this.content;
	}

	public void setContent(String content) {
		this.content = content;
	}

	@Column(name = "addTime", length = 19)
    @DateTimeFormat(pattern="yyyy-MM-dd hh:mm:ss" ) 
    @JsonFormat(pattern="yyyy-MM-dd  hh:mm:ss" ,timezone = "GMT+8")
	public Date getAddTime() {
		return this.addTime;
	}

	public void setAddTime(Date addTime) {
		this.addTime = addTime;
	}

	@Column(name = "name")
	public String getName() {
		return this.name;
	}

	public void setName(String name) {
		this.name = name;
	}

	@Column(name = "level", length = 120)
	public String getLevel() {
		return this.level;
	}

	public void setLevel(String level) {
		this.level = level;
	}

	public String getExtr() {
		return extr;
	}

	public void setExtr(String extr) {
		this.extr = extr;
	}

}